<template>
  <view :style="themeColor">
    <view class="page">
      <view class="flex benben-position-layout flex flex-wrap align-center notificationMessage_flex_0"
        :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
        <view class='flex flex-wrap align-center justify-between flex-sub notificationMessage_fd0_0'>
          <view class='flex flex-wrap align-center notificationMessage_fd0_0_c0' @tap.stop="handleJumpDiy"
            data-type="back" data-url="1">
            <text class='fu-iconfont2  notificationMessage_fd0_0_c0_c0'>&#xE794;</text>
          </view>
          <view class='flex flex-wrap align-stretch justify-center'>
            <text class='notificationMessage_fd0_0_c1_c0'>{{$t('通知消息')}}</text>
          </view>
          <view class='flex flex-wrap align-center justify-end notificationMessage_fd0_0_c0'>
          </view>
        </view>
      </view>
      <view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
      <!---flex布局flex布局开始-->
      <view class="flex flex-direction flex-wrap align-stretch benben-flex-layout notificationMessage_flex_1">
        <template v-for='(item,key0) in dataList'>
          <view class='flex flex-direction flex-wrap align-stretch notificationMessage_fd1_0' :key='key0'
            @tap.stop="handleJumpDiy" data-type="navigateTo"
            :data-url="`/pages/wode/postingDetails/postingDetails?id=${item.house_id}&type=${item.publisher_type}`">
            <view class='flex flex-wrap align-center notificationMessage_fd1_0_c0'>
              <view class='flex flex-wrap align-center'>
                <image class='notificationMessage_fd1_0_c0_c0_c0' mode="aspectFit" :src='STATIC_URL+"24.png"'></image>
                <text class='notificationMessage_fd1_0_c0_c0_c1'>{{item.title}}</text>
              </view>
              <text class='notificationMessage_fd1_0_c0_c1'>{{item.create_time}}</text>
            </view>
            <view class='flex flex-direction flex-wrap align-start notificationMessage_fd1_0_c1'>
              <view class='flex flex-wrap align-center'>
                <text class='notificationMessage_fd1_0_c1_c0_c0'>{{item.desc}}</text>
                <text class='notificationMessage_fd1_0_c1_c0_c1' v-if="item.apply_status==1">{{$t('审核通过')}}</text>
                <text class='notificationMessage_fd1_1_c1_c0_c1' v-if="item.apply_status==2">{{$t('审核未通过')}}</text>
              </view>
              <view class='flex flex-wrap align-center notificationMessage_fd1_1_c1_c1' v-if="item.refuse_reason">
                <text class='notificationMessage_fd1_1_c1_c1_c0'>{{$t('原因')}}：</text>
                <text class='notificationMessage_fd1_1_c1_c1_c0'>{{item.refuse_reason}}</text>
              </view>
            </view>
          </view>
        </template>
        <fu-empty-ui v-if="dataList.length==0"></fu-empty-ui>
        <!--  <view class='flex flex-direction flex-wrap align-stretch notificationMessage_fd1_0'>
          <view class='flex flex-wrap align-center notificationMessage_fd1_0_c0'>
            <view class='flex flex-wrap align-center'>
              <image class='notificationMessage_fd1_0_c0_c0_c0' mode="aspectFit" :src='STATIC_URL+"24.png"'></image>
              <text class='notificationMessage_fd1_0_c0_c0_c1'>审核通知</text>
            </view>
            <text class='notificationMessage_fd1_0_c0_c1'>2023-09-26 12:23</text>
          </view>
          <view class='flex flex-direction flex-wrap align-start notificationMessage_fd1_0_c1'>
            <view class='flex flex-wrap align-center'>
              <text class='notificationMessage_fd1_0_c1_c0_c0'>您发布的房源信息</text>
              <text class='notificationMessage_fd1_1_c1_c0_c1'>审核未通过</text>
            </view>
            <view class='flex flex-wrap align-center notificationMessage_fd1_1_c1_c1'>
              <text class='notificationMessage_fd1_1_c1_c1_c0'>原因：</text>
              <text class='notificationMessage_fd1_1_c1_c1_c0'>房源信息不真实</text>
            </view>
          </view>
        </view> -->
      </view>

      <!---flex布局flex布局结束-->


    </view>
  </view>
</template>
<script>
  import {
    validate
  } from '@/common/utils/validate.js'
  export default {
    components: {},


    data() {
      return {
        "dataList": [],
        msg_type: ''
      };
    },
    computed: {
      themeColor() {
        return this.$store.getters.themeColor
      },

    },
    watch: {},
    onLoad(options) {
      this.msg_type = options.msg_type
      this.getMsgListFunc()
    },
    onUnload() {

    },
    onReady() {

    },
    onShow() {

    },
    onHide() {

    },
    onResize() {

    },
    onPullDownRefresh() {

    },
    onReachBottom(e) {

    },
    onPageScroll(e) {

    },
    methods: {
      //获取通知列表
      async getMsgListFunc() {
        //请求方法
        //数据验证

        let datadataList = await this.$api.get(global.apiUrls.post6424280846288, {
          msg_type: this.msg_type
        });

        if (datadataList.data.code != 1) {
          this.$message.info(datadataList.data.msg);
          return
        }
        let infodataList = datadataList.data.data;
        this.dataList = infodataList.data

      }
    }
  };
</script>
<style lang="scss" scoped>
  .page {
    width: 100vw;
    overflow-x: hidden;
    min-height: calc(100vh - var(--window-bottom));
    background: rgba(248, 248, 248, 1);
    background-size: 100% auto;
  }

  .notificationMessage_flex_0 {
    background: #fff;
    width: 750rpx;
    height: 88rpx;
    overflow: hidden;
    z-index: 10;
    top: 0rpx;
    background-size: 100% auto !important;
  }

  .notificationMessage_fd0_0_c1_c0 {
    font-size: 36rpx;
    font-weight: 700;
    color: #333;
    line-height: 88rpx;
  }

  .notificationMessage_fd0_0_c0_c0 {
    font-size: 36rpx;
    color: #333;
  }

  .notificationMessage_fd0_0_c0 {
    width: 120rpx;
  }

  .notificationMessage_fd0_0 {
    padding: 0rpx 32rpx 0rpx 32rpx;
  }

  .notificationMessage_flex_1 {
    padding: 24rpx 32rpx 0rpx 32rpx;
  }

  .notificationMessage_fd1_1_c1_c1_c0 {
    color: #FF4343;
    font-size: 28rpx;
    font-weight: 400;
    line-height: 32rpx;
  }

  .notificationMessage_fd1_1_c1_c1 {
    margin: 10rpx 0rpx 0rpx 0rpx;
  }

  .notificationMessage_fd1_1_c1_c0_c1 {
    color: rgba(255, 67, 67, 1);
    font-size: 32rpx;
    font-weight: 500;
    line-height: 32rpx;
  }

  .notificationMessage_fd1_0_c1_c0_c1 {
    color: #0181FF;
    font-size: 32rpx;
    font-weight: 500;
    line-height: 32rpx;
  }

  .notificationMessage_fd1_0_c1_c0_c0 {
    color: rgba(51, 51, 51, 1);
    font-size: 32rpx;
    font-weight: 500;
    line-height: 32rpx;
  }

  .notificationMessage_fd1_0_c1 {
    padding: 24rpx 24rpx 32rpx 24rpx;
  }

  .notificationMessage_fd1_0_c0_c1 {
    margin: 0rpx 0rpx 0rpx auto;
    color: #999999;
    font-size: 24rpx;
    font-weight: 400;
    line-height: 32rpx;
  }

  .notificationMessage_fd1_0_c0_c0_c1 {
    color: #999999;
    font-size: 28rpx;
    font-weight: 400;
    line-height: 32rpx;
  }

  .notificationMessage_fd1_0_c0_c0_c0 {
    width: 40rpx;
    height: 40rpx;
    border-radius: 0rpx 0rpx 0rpx 0rpx;
    margin: 0rpx 16rpx 0rpx 0rpx;
  }

  .notificationMessage_fd1_0_c0 {
    border-bottom: 1px solid #eee;
    padding: 32rpx 24rpx 25rpx 24rpx;
  }

  .notificationMessage_fd1_0 {
    background: rgba(255, 255, 255, 1);
    border-radius: 16rpx;
    background-size: 100% auto;
    margin: 0rpx 0rpx 24rpx 0rpx;
  }
</style>